<?php

// +----------------------------------------------------------------------
// | ThinkAdmin
// +----------------------------------------------------------------------
// | 版权所有 2014~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目：https://github.com/zoujingli/ThinkAdmin
// +----------------------------------------------------------------------

namespace think;
header("Content-type: text/html; charset=utf-8");
header("Access-Control-Allow-Origin: * ");
header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE");
header("Access-Control-Allow-Headers: Content-Type,api-token,CloudId,CloudPid");

$url = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'];
defined('WEB_PATH_DIR') ? '' : define('WEB_PATH_DIR',str_replace("\\",'/',__DIR__));
define('EXTEND_PATH', __DIR__ .'/extend/');
defined('WEB_URL') ? '' : define('WEB_URL',$url);
// 加载基础文件
require __DIR__ . '/thinkphp/base.php';

// think文件检查，防止TP目录计算异常
file_exists('think') || touch('think');

// 执行应用并响应
Container::get('app', [__DIR__ . '/application/'])->run()->send();